<?php
    $maisAcessado = $this->IndexModel->buscaMaisAcessado()->result();
    $tag = $this->IndexModel->buscaTags()->result();
    $evento = $this->IndexModel->buscaMateriaCategoria(28,5,0)->result();
    $especial = $this->IndexModel->buscaMateriaCategoria(29,1,0)->row();
    $materiaEntenda = $this->IndexModel->buscaMateriaCategoria(11,1,1)->row();
    $materiaCuriosidade = $this->IndexModel->buscaMateriaCategoria(12,1,1)->row();
?>
<div class="span4 right-sidebar">
                    <!-- busca-->
                   <div class="row">
                    <div class="span4 box-widget">
                        <?php
                        $atributos_formulario = array('class' => 'form-search pull-right', 'id'=>'form1');
                        echo form_open ("PesquisaController/pesquisa/",$atributos_formulario);
                        echo form_input(array('name'=>'texto', 'class'=>'search-query search-form validate[required, minSize[3],custom[onlyLetterNumber]]','placeholder'=>'Digite uma palavra...'),  set_value('texto'));
                        $btnGravar = array('name' => 'button','id' => 'button','value' => 'true','type' => 'submit', 'content' => 'Ir', 'class' => 'btn');
                        echo form_button($btnGravar); 
                        echo form_close(); ?>
                    </div>
                   </div>
                    
                    <!--fim da busca-->
                    
                    <br/>
					<!-- abas-->	
                    <div class="row">
                        <div class="span4 tab-box box-widget">
                            <div class="tabbable">
                                <ul class="nav nav-tabs">
                                    <li class="active"><a href="#1" data-toggle="tab"><i class="icon-star"></i>&nbsp;Popular</a></li>
                                    <!--<li><a href="#2" data-toggle="tab"><i class="icon-comment"></i>&nbsp;Comments</a></li>-->
                                    <li><a href="#3" data-toggle="tab"><i class="icon-tags"></i>&nbsp;Tags</a></li>
                                </ul>
                                <div class="tab-content">
                                    <?php
                                     	include("aba_mais_acessado.php");
                                        include("aba_tags.php");
					#include_once("aba_mais_comentado.php");
                                    ?>
                                  	
                                </div>
                            </div>

                        </div>
                    </div>
                    <!-- fim das abas-->
                    <br/>
                    <!-- mini galeria-->
                    <?php $this->load->view('paginas/mini_galeria');?>
                    <!-- mini galeira -->
                    <br/>

                    <div class="row">
                        <div class="span4">
                            <div class="span2 sidebar-left">
                                <div class="widget-title">
                                    <h3>Categorias</h3>
                                </div>
                                 <ul class="nav">
                                     <li><?=anchor(base_url()."CategoriaController/todasDaCategoria/Mundo",'Mundo');?></li>
                                     <li><?=anchor(base_url()."CategoriaController/todasDaCategoria/Brasil",'Brasil');?></li>
                                     <li><?=anchor(base_url()."CategoriaController/todasDaCategoria/Paraiba",'Paraíba');?></li>
                                     <li><?=anchor(base_url()."CategoriaController/todasDaCategoria/Geografia",'Geografia');?></li>
                                     <li><?=anchor(base_url()."CategoriaController/todasDaCategoria/Entenda",'Entenda');?></li>
                                     <li><?=anchor(base_url()."CategoriaController/todasDaCategoria/Curiosidade",'Curiosidade');?></li>
                                     
                                </ul>
                            
                              <div class="widget-title">
                                    <h3>Especiais</h3>
                                </div>
                                <ul class="nav">
                                    <li>
                                        <?=anchor(base_url()."AssuntoController/buscaAssunto/".$especial->codigo_pagina,$especial->titulo);?>
                                    </li>
                                </ul>
                                </div>
                            <div class="span2 sidebar-right">
                                <div class="widget-title">
                                    <h3>Eventos</h3>
                                </div>
                                
                                	<?php
                                        foreach($evento as $eventos){ ?>                       	
                                           <p class="date"><?=$eventos->data;?></p>
                                            	<?=anchor(base_url()."AssuntoController/buscaAssunto/".$eventos->codigo_pagina,'<p>'.$eventos->titulo.'</p>');?>
                                            	<hr />      	
                                    <?php
                                     }
                                    ?>
                                
                            </div>
                        </div>
                    </div>
                    <br/>
                    <?php include('conteudo_vestibulando.php');?>
                    <br />
                    <?php include('plugin_social_facebook.php');?>
                    <br />
                    <?php include('conteudo_entenda.php');?>
                    <br />
                    <?php include('conteudo_curiosidade.php');?>
                    
                    <br/>

                </div>